package com.yx.modules.api.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.yx.common.utils.Query;
import com.yx.modules.api.dao.TbVolumeDao;
import com.yx.modules.api.entity.TbVolume;
import com.yx.modules.api.service.TbVolumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;




@Service
public class TbVolumeServiceImpl implements TbVolumeService {
	@Autowired
	private TbVolumeDao volumeDao;
	
	@Override
	public TbVolume queryObject(Integer id){
		return volumeDao.queryObject(id);
	}
	
	@Override
	public List<TbVolume> queryList(Map<String, Object> map){
		return volumeDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return volumeDao.queryTotal(map);
	}
	
	@Override
	public void save(TbVolume volume){
		volumeDao.save(volume);
	}
	
	@Override
	public void update(TbVolume volume){
		volumeDao.update(volume);
	}
	
	@Override
	public void delete(Integer id){
		volumeDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		volumeDao.deleteBatch(ids);
	}

	@Override
	public List<TbVolume> findByBookId(Integer bookId) {
		return volumeDao.findByBookId(bookId);
	}

	@Override
	public Page<TbVolume> queryPageList(Page<TbVolume> page, Map<String, Object> map) {
		page.setRecords(volumeDao.queryPageList(page, map));
		return page;
	}


}
